#ifndef DYN_SPECIALFUNCTIONS_BESSELY_H
#define DYN_SPECIALFUNCTIONS_BESSELY_H

#include <complex>
#include <armadillo>
#include <boost/math/special_functions/bessel.hpp>

#include "../utilities/dyn_functor.h"
#include "dyn_fortranLinkage_bessel.h"

using namespace std;
typedef complex<double> d_complex;

/*! \author Joey Dumont <joey.dumont@gmail.com>
 *
 * \date 2012-08-23
 *
 * \brief Implements the Bessel function of the second kind
 * for real and complex arguments.
 *
 * This is essentially a wrapper class that provides
 * functions to compute the Bessel function of the second
 * kind for real and complex arguments.
 *
 * For real arguments (and real return value), we use the Boost
 * implementation of the Bessel functions. For complex arguments,
 * we link to the Fortran code written by Amos \cite AMO86.
 * It computes the Bessel functions for complex arguments and nonnegative
 * order.
 *
 * \copyright LGPL.
 */

class BesselY : public Functor
{
public:
    /*! Constructor defines order. */
    BesselY(double _order);

    /*! @name Accessor Functions */
    //@{
    double getOrder(){return order;}

    void setOrder(double _order){order=_order;}
    //@}

    /*! @name Computation of Bessel function. */
    //@{
    double operator()(const double x);
    d_complex operator()(const d_complex z);
    //@}

protected:
    /*! Order to be computed. */
    double order;
};

#endif // DYN_SPECIALFUNCTIONS_BESSELY_H
